local messagebus = require('messagebus')

local bus = messagebus.new()

local cb1 = function (arg1, arg2)
    print("cb1:" .. arg1)
end

local cb2 = function (arg1, arg2)
    print("cb2:" .. arg2)
end

bus.subscribe('greet', cb1)
bus.subscribe('greet', cb2)
bus.publish('greet', 'hello', 'world')
bus.unsubscribe('greet', cb1)
bus.publish('greet', '123', 'abc')